<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数字史馆后台管理</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: "Microsoft YaHei", sans-serif;
            background: #f5f5f5;
            display: flex;
            min-height: 100vh;
        }

        .sidebar {
            width: 200px;
            background: #333;
            padding: 20px 0;
            color: white;
        }

        .logo {
            padding: 0 20px;
            margin-bottom: 20px;
            font-size: 18px;
            color: #fff;
            text-align: center;
        }

        .nav-item {
            padding: 12px 20px;
            cursor: pointer;
            color: #ddd;
            text-decoration: none;
            display: block;
        }

        .nav-item:hover {
            background: #444;
        }

        .nav-item.active {
            background: #8b0000;
            color: white;
        }

        .main-content {
            flex: 1;
            padding: 20px;
            background: #f5f5f5;
        }

        iframe {
            width: 100%;
            height: calc(100vh - 40px);
            border: none;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
    </style>
</head>
<body>
    <div class="sidebar">
        <div class="logo">数字史馆后台管理</div>
        <a href="pages/heroes.html" target="mainFrame" class="nav-item active">英雄管理</a>
        <a href="pages/feedback.html" target="mainFrame" class="nav-item">意见建议</a>
        <a href="pages/messages.html" target="mainFrame" class="nav-item">留言管理</a>
        <a href="pages/books.html" target="mainFrame" class="nav-item">电子书管理</a>
    </div>
    
    <div class="main-content">
        <iframe name="mainFrame" src="pages/heroes.html"></iframe>
    </div>

    <script>
        // 处理导航高亮
        document.querySelectorAll('.nav-item').forEach(item => {
            item.addEventListener('click', () => {
                document.querySelectorAll('.nav-item').forEach(nav => {
                    nav.classList.remove('active');
                });
                item.classList.add('active');
            });
        });
    </script>
</body>
</html> 